package com.itfreer.gis.locus.data.entity;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

import com.itfreer.form.api.entity.EntityBase;

import javax.persistence.*;

/**
 * 巡护轨迹
 */
@Entity(name = "gis_locus_data")
public class LocusDataEntity extends EntityBase implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 * Id
	 */
	@Id
	@Column(name = "id", length = 50)
	private String id;

	/**
	 * 所有者
	 */
	@Column(name = "s_owerid", length = 50, nullable = true)
	private String owerid;

	/**
	 * 所有者
	 */
	@Column(name = "s_owername", length = 50, nullable = true)
	private String owername;

	/**
	 * 开始时间
	 */
	@Column(name = "d_begintime", nullable = true)
	private Date beginTime;

	/**
	 * 结束时间
	 */
	@Column(name = "d_endtime", nullable = true)
	private Date endTime;

	/**
	 * 总时长（分钟）
	 */
	@Column(name = "d_timecount", nullable = true)
	private Double timeCount;

	/**
	 * 总距离（公里）
	 */
	@Column(name = "d_distance", nullable = true)
	private Double distance;

	@Column(name = "s_zones", nullable = true)
	private String zones;

	public String[] getZones() {
		return this.getStringArray(zones);
	}

	public void setZones(String[] zones) {
		this.zones = this.getArrayString(zones);
	}

	/**
	 * 租户ID
	 */
	@Column(name = "s_tenantID", length = 50, nullable = true)
	private String tenantID;

	/**
	 * 租户名称
	 */
	@Column(name = "s_tenantName", length = 50, nullable = true)
	private String tenantName;

    @Transient
	private List<LocusDataItemEntity> locusDataItemEntityList;

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getOwerid() {
		return owerid;
	}

	public void setOwerid(String owerid) {
		this.owerid = owerid;
	}

	public String getOwername() {
		return owername;
	}

	public void setOwername(String owername) {
		this.owername = owername;
	}

	public Date getBeginTime() {
		return beginTime;
	}

	public void setBeginTime(Date beginTime) {
		this.beginTime = beginTime;
	}

	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}

	public Double getTimeCount() {
		return timeCount;
	}

	public void setTimeCount(Double timeCount) {
		this.timeCount = timeCount;
	}

	public Double getDistance() {
		return distance;
	}

	public void setDistance(Double distance) {
		this.distance = distance;
	}

	/**
	 * 租户ID
	 */
	public String getTenantID() {
		return tenantID;
	}

	/**
	 * 租户ID
	 */
	public void setTenantID(String tenantID) {
		this.tenantID = tenantID;
	}

	/**
	 * 租户名称
	 */
	public String getTenantName() {
		return tenantName;
	}

	/**
	 * 租户名称
	 */
	public void setTenantName(String tenantName) {
		this.tenantName = tenantName;
	}

    public List<LocusDataItemEntity> getLocusDataItemEntityList() {
        return locusDataItemEntityList;
    }

    public void setLocusDataItemEntityList(List<LocusDataItemEntity> locusDataItemEntityList) {
        this.locusDataItemEntityList = locusDataItemEntityList;
    }
}
